import Vue from 'vue'
import App from './App.vue'
import store from './store'
import router from './router'
import axios from "axios";
import "./assets/icon/iconfont.css"
import 'element-ui/lib/theme-chalk/index.css'
import { MessageBox,Message,Collapse,CollapseItem,Icon,Button,Pagination,Radio,RadioGroup,
  Checkbox,CheckboxGroup,Input,MenuItem,MenuItemGroup,Row,Col,Submenu,Menu,Table,TableColumn,Form,FormItem} from 'element-ui'
import CollapseTransition from 'element-ui/lib/transitions/collapse-transition';

Vue.component(CollapseTransition.name, CollapseTransition)
Vue.config.productionTip = false
Vue.prototype.$prompt = MessageBox.prompt
Vue.prototype.$confirm = MessageBox.confirm
Vue.prototype.$message = Message
Vue.prototype.axios = axios;
axios.defaults.baseURL = "/api";
Vue.use(Collapse)
Vue.use(Icon)
Vue.use(CollapseItem)
Vue.use(Button)
Vue.use(Pagination)
Vue.use(Radio)
Vue.use(RadioGroup)
Vue.use(Checkbox)
Vue.use(CheckboxGroup)
Vue.use(Input)
Vue.use(MenuItem)
Vue.use(Menu)
Vue.use(MenuItemGroup)
Vue.use(Row)
Vue.use(Col)
Vue.use(Submenu)
Vue.use(Table)
Vue.use(TableColumn)
Vue.use(Form)
Vue.use(FormItem)
//接口错误拦截
// axios.interceptors.response.use(function(response){
//   let res = response.data
//   let path = location.hash
//   if(res.status == 1){
//     return res.data
//   }
// })
new Vue({
  store,
  router,
  render: h => h(App)
}).$mount('#app')
